<!DOCTYPE html>
<html lang="en" xmlns:zxw="http://www.w3school.com.cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>首页</title>
    <link rel="stylesheet" href="../../../js/common/layui/css/layui.css">
    <link rel="stylesheet" href="../../../css/common/animate.css"/>
    <link rel="stylesheet" href="../../../css/common/common.css"/>
</head>
<body class="layout-zxw zxw-body">
<div class="layui-form">
    <form action="" class="zxw-search">
        <div class="layui-form-item">
            <zxw:input id="name" name="name" inline="true" placeholder="请输入用户名" parcel="true"
                       parcelName="用户名"></zxw:input>
            <zxw:input id="mobile" name="mobile" inline="true" placeholder="请输入手机号" parcel="true"
                       parcelName="手机号"></zxw:input>
            <zxw:input id="email" name="email" inline="true" placeholder="请输入email" parcel="true"
                       parcelName="email"></zxw:input>
            <div class="layui-inline">
                <zxw:bnt type="query" control="user/getList" tableid="textTable" title="查询"></zxw:bnt>
                <zxw:bnt type="add" control="user/save|user/saveUser" url="../html/sys/user/add.html"
                         title="新增"></zxw:bnt>
                <zxw:bnt type="import" control="user/importUser" url="URL.USER.IMPORT"
                         template="/html/sys/user/template.xlsx" title="导入用户"></zxw:bnt>
            </div>
        </div>
    </form>
    <hr/>
    <div class="zxw-list">
        <div class="zxw-table-tool" id="zxw-table-tool">
            <zxw:bnt type="delete" control="user/delete" class="layui-btn-sm" ico="" url="URL.USER.DELETE"
                     title="批量删除"></zxw:bnt>
            <zxw:bnt type="reset" control="user/resetPassword" class="layui-btn-sm" url="URL.USER.RESETPASSWORD"
                     msg="确定要批量重置密码吗？" title="批量重置密码"></zxw:bnt>
            <zxw:bnt type="forbidden" control="user/forbidden" class="layui-btn-sm" url="URL.USER.FORBIDDEN"
                     msg="确定要批量启用或禁用数据吗？" title="批量启用禁用"></zxw:bnt>
        </div>
        <zxw:table control="user/getList" cellMinWidth="10" class="zxw_table layui-table layui-hide" page="true"
                   loading="true" url="URL.USER.GETLIST" id="textTable">
            <zxw:thead class="zxw_head">
                <zxw:tr class="zxw_tr">
                    <zxw:th class="zxw_th" type="checkbox" fixed="left"></zxw:th>
                    <zxw:th class="zxw_th" field="head_img" title="头像">
                        <img class="showImg" style="width: 60px;height: 60px;" src="{{ d.head_img }}"/>
                    </zxw:th>
                    <zxw:th class="zxw_th" field="state_name" sort="true" title="状态">
                        {{# if(d.state == 1){ }}
                        <span class="layui-badge layui-bg-blue">{{ d.state_name }}</span>
                        {{# }else{ }}
                        <span class="layui-badge">{{ d.state_name }}</span>
                        {{# } }}
                    </zxw:th>
                    <zxw:th class="zxw_th" field="name" sort="true" title="用户名"></zxw:th>
                    <zxw:th class="zxw_th" field="email" sort="true" title="email"></zxw:th>
                    <zxw:th class="zxw_th" field="mobile" sort="true" title="手机号"></zxw:th>
                    <zxw:th class="zxw_th" field="bir" sort="true" title="生日"></zxw:th>
                    <zxw:th class="zxw_th" field="add" sort="true" title="地址"></zxw:th>
                    <zxw:th class="zxw_th" field="role_name" sort="true" title="角色"></zxw:th>
                    <zxw:th field="org_name" sort="true" title="部门"></zxw:th>
                    <zxw:th field="org_manage_name" sort="true" title="部门管理"></zxw:th>
                    <zxw:th fixed="right" minWidth="310" class="">
                        <zxw:handle title="查看" control="user/getMap" name="query" fun=""
                                    url="../html/sys/user/add.html"></zxw:handle>
                        <zxw:handle title="编辑" control="user/save" name="edit" fun=""
                                    url="../html/sys/user/add.html"></zxw:handle>
                        <zxw:handle title="删除" name="delete" control="user/delete" class="layui-btn-danger"
                                    url="URL.USER.DELETE"></zxw:handle>
                        <zxw:handle title="重置密码" name="reset" control="user/resetPassword" warnTitle="确定要重置密码吗？"
                                    class="layui-btn-danger" url="URL.USER.RESETPASSWORD"></zxw:handle>
                        <zxw:handle title="禁用账户" name="forbidden" control="user/forbidden" show="d.state == 1"
                                    warnTitle="确定要禁用该用户吗？" class="layui-btn-danger"
                                    url="URL.USER.FORBIDDEN"></zxw:handle>
                        <zxw:handle title="启用账户" name="forbidden" control="user/forbidden" show="d.state == 0"
                                    warnTitle="确定要启用该用户吗？" url="URL.USER.FORBIDDEN"></zxw:handle>
                    </zxw:th>
                </zxw:tr>
            </zxw:thead>
        </zxw:table>
    </div>
</div>
<script type="application/javascript" src="../../../js/common/own/own.js?layui,jquery,njzxw,URL">
    njzxw.layui.init();
</script>
</body>
</html>